
	//图片批量上传
	var savePicture = preQuery + "savePicture";
	document.getElementById('image').addEventListener('change', function(e) {
		let imagePreview = document.getElementById('image-preview');
		for (let i = 0; i < e.target.files.length; i++) {
			let file = e.target.files[i];
			let reader = new FileReader();
			reader.onload = (function(theFile) {
				return function(e) {
					let img = document.createElement('img');
					img.src = e.target.result;
					img.alt = theFile.name;
					img.width = "100";
					imagePreview.appendChild(img);
				}
			})(file);
			reader.readAsDataURL(file);
			
			//使用AJAX上传图片
			let formData = new FormData();
			formData.append('uploadFile',file);
				
			//urlById savePicture
			/**
			RestfulClient.post(savePicture, {
				body: formData,
			},function(){
				
			},
			function(){
				
			});
			 */
			fetch(savePicture, {
				method: 'POST',
				body: formData 
			})
			.then(response => response.json())
			.then(data => {
				console.log('成功批量上传：', data);
			})
			.catch(error => {
				console.error('上传失败：', error);
			})
		}
	});

	